import request from '@/utils/request'

// 查询视频资源列表
export function listVideoResource(query) {
  return request({
    url: '/movie/resource/list',
    method: 'get',
    params: query
  })
}

// 查询视频资源详细
export function getVideoResource(resourceId) {
  return request({
    url: '/movie/resource/' + resourceId,
    method: 'get'
  })
}

// 根据视频ID查询资源列表
export function getVideoResourceByVideoId(videoId) {
  return request({
    url: '/movie/resource/video/' + videoId,
    method: 'get'
  })
}

// 新增视频资源
export function addVideoResource(data) {
  return request({
    url: '/movie/resource',
    method: 'post',
    data: data
  })
}

// 修改视频资源
export function updateVideoResource(data) {
  return request({
    url: '/movie/resource',
    method: 'put',
    data: data
  })
}

// 删除视频资源
export function delVideoResource(resourceId) {
  return request({
    url: '/movie/resource/' + resourceId,
    method: 'delete'
  })
}

// 导出视频资源
export function exportVideoResource(query) {
  return request({
    url: '/movie/resource/export',
    method: 'post',
    params: query
  })
}
